﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Vision.Core.ActivityComponents.Assembly
{
    // Interaction logic for CreateInstanceDesigner.xaml
    public partial class CreateInstanceDesigner
    {
        //bool bIsSubscribed = false;
        //ComboBox cboAssembly = null;

        public CreateInstanceDesigner()
        {
            InitializeComponent();

            //this.Loaded += new RoutedEventHandler(CreateInstanceDesigner_Loaded);
        }

        /*
        void CreateInstanceDesigner_Loaded(object sender, RoutedEventArgs e)
        {
            cboAssembly = ContentPresenter_1.ContentTemplate.FindName("cboAssembly", ContentPresenter_1) as ComboBox;
        }

        protected override void OnModelItemChanged(object newItem)
        {
            base.OnModelItemChanged(newItem);

            if (this.Context.Services.Contains<Services.IAssemblyListService>())
            {
                this.Context.Services.Subscribe<Services.IAssemblyListService>(
                    serviceInstance =>
                    {
                        if (cboAssembly != null)
                            cboAssembly.ItemsSource = serviceInstance.GetAssemblyNames();
                    }
                );
            }
        }
        */
    }
}
